<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/templates/admin.xhtml">
        <ui:define name="title">
            <h:outputText value="Ksc Administrator - Event Detail"></h:outputText>
        </ui:define>
        <ui:define name="currentPage">Event Detail</ui:define>
        <ui:define name="mainContent">
            <h:form id="formInformation">
                <table>
                    <tr>
                        <td>
                            <h:outputLabel value="Name" for="name" />
                        </td>
                        <td>
                            <h:inputText id="name" 
                                         value="#{eventDetailController.object.name}" 
                                         title="Name"
                                         required="true"
                                         requiredMessage="You must input event name"/>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><h:message for="name" errorStyle="color: red"/></td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Activity" for="activity" />
                        </td>
                        <td>
                            <p:selectOneMenu 
                                id="activity"
                                value="#{eventDetailController.object.activity}"
                                converter="activityConverter"
                                >
                                <f:selectItems value="#{activityListController.listData}" var="activity" 
                                               itemLabel="#{activity.name}" 
                                               />
                            </p:selectOneMenu>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><h:message for="district" errorStyle="color: red"/></td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Introduction" for="introduction" />
                        </td>
                        <td>
                            <h:inputText id="introduction" 
                                         value="#{eventDetailController.object.introduction}" 
                                         title="Introduction"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Conduct Time" for="conductTime" />
                        </td>
                        <td>
                            <p:calendar id="conductTime" 
                                        pattern="dd/MM/yyyy HH:mm:ss" 
                                        value="#{eventDetailController.object.conductTime}" 
                                        title="Conduct Time" 
                                        showOn="button"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Fee" for="fee" />
                        </td>
                        <td>
                            <h:inputText id="fee" 
                                         value="#{eventDetailController.object.fee}" 
                                         title="Fee"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Speaker" for="speaker" />
                        </td>
                        <td>
                            <h:inputText id="speaker" 
                                         value="#{eventDetailController.object.speaker}" 
                                         title="Speaker"
                                         />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Guest" for="guest" />
                        </td>
                        <td>
                            <h:inputText id="guest" 
                                         value="#{eventDetailController.object.guest}" 
                                         title="Guest"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Prize" for="prize" />
                        </td>
                        <td>
                            <h:inputText id="prize" 
                                         value="#{eventDetailController.object.prize}" 
                                         title="Prize"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Address" for="address" />
                        </td>
                        <td>
                            <h:inputText id="address" 
                                         value="#{eventDetailController.object.address}" 
                                         title="Address"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Procedure" for="procedure" />
                        </td>
                        <td>
                            <h:inputText id="procedure" 
                                         value="#{eventDetailController.object.procedure}" 
                                         title="Procedure"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Term" for="term" />
                        </td>
                        <td>
                            <h:inputText id="term" 
                                         value="#{eventDetailController.object.term}" 
                                         title="Term"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputLabel value="Criteria" for="criteria" />
                        </td>
                        <td>
                            <h:inputText id="criteria" 
                                         value="#{eventDetailController.object.criteria}" 
                                         title="Criteria"/>
                        </td>
                    </tr>
                    
                    <tr>
                        <td></td>
                        <td>
                            <h:commandLink 
                                action="#{eventDetailController.execute()}" value="#{bundle.Save}" />
                        </td>
                    </tr>
                </table>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
